<%@ page contentType="text/html; charset=utf-8" language="java" errorPage="" %>
<%@ taglib uri="/struts-tags" prefix="s" %>
<head>
<title>添加EpowerKv</title>
<style type="text/css" media="screen">
	#lightbox{
        position:absolute;
        left:0;
        top:0;
        visibility:hidden;
        z-index:10000;
		text-align: center;
    }
    .noscroll{
    	overflow:hidden;
    }
</style>
<script type="text/javascript" src="<s:url value="/js/formValidator3.5.js" includeParams="none"/>" charset="UTF-8"></script>
<script type="text/javascript">
    $(document).ready(function() {
		if ('<s:property value="msg"/>' != '') {
			alert('<s:property value="msg"/>');
		}
		initValidator();
	});
	function initValidator() {
		$.formValidator.initConfig({formid:"addform",onerror:function(msg){alert(msg);}});
		
			$('#keycode').formValidator({onshow:"请输入keycode",onfocus:"keycode不能为空",oncorrect:"输入正确"}).functionValidator({
				fun:function(val,elem){
					$(elem).val($.trim(val));
				}
			}).inputValidator({min:1,max:9999,onerror:"keycode不能为空,请确认"});
			$('#keyvalue').formValidator({onshow:"请输入keyvalue",onfocus:"keyvalue不能为空",oncorrect:"输入正确"}).functionValidator({
				fun:function(val,elem){
					$(elem).val($.trim(val));
				}
			}).inputValidator({min:1,max:9999,onerror:"keyvalue不能为空,请确认"});
			$('#des').formValidator({onshow:"请输入des",onfocus:"des不能为空",oncorrect:"输入正确"}).functionValidator({
				fun:function(val,elem){
					$(elem).val($.trim(val));
				}
			}).inputValidator({min:1,max:9999,onerror:"des不能为空,请确认"});
		
	}
</script>
</head>

<body>
<s:form theme="simple" action="addEpowerKv" method="post" id="addform">
	<div id="sa" class="sa p10 mb10">
		<table>
			
			<tr>
				<th>keycode：</th>
				<td>
					<input type="text" value="<s:property value="epowerKv.keycode"/>" id=keycode name="epowerKv.keycode" size="64"/>
					<div id="keycodeTip"></div>
				</td>
			</tr>
			
			<tr>
				<th>keyvalue：</th>
				<td>
					<input type="text" value="<s:property value="epowerKv.keyvalue"/>" id=keyvalue name="epowerKv.keyvalue" size="64"/>
					<div id="keyvalueTip"></div>
				</td>
			</tr>
			
			<tr>
				<th>des：</th>
				<td>
					<input type="text" value="<s:property value="epowerKv.des"/>" id=des name="epowerKv.des" size="64"/>
					<div id="desTip"></div>
				</td>
			</tr>
			
		</table>
	</div>
	<div id="sb" class="sb p1020">
		<s:submit value="保存" cssClass="btn1"/>	
	</div>
	<div style="text-align:center;color:red;">
		<s:actionmessage />
	</div>
</s:form>
</body>
